<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: EvalContext.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_eval_context_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">EvalContext.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * File:    EvalContext.h</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright (c) Freescale Semiconductor, Inc. All rights reserved.</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * See included license file for license details.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#if !defined(_EvalContext_h_)</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#define _EvalContext_h_</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;map&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &quot;Value.h&quot;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;int_size.h&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &quot;SourceFile.h&quot;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceelftosb.html">elftosb</a></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;{</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="classelftosb_1_1_eval_context.html">   28</a></span>&#160;<span class="keyword">class </span><a class="code" href="classelftosb_1_1_eval_context.html">EvalContext</a></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;{</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classelftosb_1_1_eval_context_1_1_source_file_manager.html">   34</a></span>&#160;    <span class="keyword">class </span><a class="code" href="classelftosb_1_1_eval_context_1_1_source_file_manager.html">SourceFileManager</a></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    {</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classelftosb_1_1_eval_context_1_1_source_file_manager.html#a72d8bb09805a7953d0f6f75bc6ecaab6">hasSourceFile</a>(<span class="keyword">const</span> std::string &amp;name) = 0;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classelftosb_1_1_source_file.html">SourceFile</a> *<a class="code" href="classelftosb_1_1_eval_context_1_1_source_file_manager.html#a3cd691ef5a323c66ce3056a808d5b419">getSourceFile</a>(<span class="keyword">const</span> std::string &amp;name) = 0;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classelftosb_1_1_source_file.html">SourceFile</a> *<a class="code" href="classelftosb_1_1_eval_context_1_1_source_file_manager.html#a77eaf2b2bd129fd1ec495da9ede69713">getDefaultSourceFile</a>() = 0;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    };</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <a class="code" href="classelftosb_1_1_eval_context.html#ac96959da6d939b887cf79cf425fc0c44">EvalContext</a>();</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classelftosb_1_1_eval_context.html#a55c89be51b2fb6e2ef43c71094d7350a">~EvalContext</a>();</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordtype">void</span> setSourceFileManager(<a class="code" href="classelftosb_1_1_eval_context_1_1_source_file_manager.html">SourceFileManager</a> *manager) { <a class="code" href="classelftosb_1_1_eval_context.html#a9f1840650a0389ba5c685160814f231b">m_sourcesManager</a> = manager; }</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <a class="code" href="classelftosb_1_1_eval_context_1_1_source_file_manager.html">SourceFileManager</a> *getSourceFileManager() { <span class="keywordflow">return</span> <a class="code" href="classelftosb_1_1_eval_context.html#a9f1840650a0389ba5c685160814f231b">m_sourcesManager</a>; }</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="keywordtype">bool</span> isVariableDefined(<span class="keyword">const</span> std::string &amp;name);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    uint32_t getVariableValue(<span class="keyword">const</span> std::string &amp;name);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    int_size_t getVariableSize(<span class="keyword">const</span> std::string &amp;name);</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keywordtype">void</span> setVariable(<span class="keyword">const</span> std::string &amp;name, uint32_t value, int_size_t size = kWordSize);</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordtype">bool</span> isVariableLocked(<span class="keyword">const</span> std::string &amp;name);</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="keywordtype">void</span> lockVariable(<span class="keyword">const</span> std::string &amp;name);</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keywordtype">void</span> unlockVariable(<span class="keyword">const</span> std::string &amp;name);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keywordtype">void</span> dump();</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classelftosb_1_1_eval_context.html">   81</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="classelftosb_1_1_eval_context.html#structelftosb_1_1_eval_context_1_1variable__info__t">variable_info_t</a></div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    {</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classelftosb_1_1_eval_context.html#a15d91ed91bca7ec1efb09d2dca3d028d">   83</a></span>&#160;        uint32_t <a class="code" href="classelftosb_1_1_eval_context.html#a15d91ed91bca7ec1efb09d2dca3d028d">m_value</a>;  </div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classelftosb_1_1_eval_context.html#a8f1495b8ddd636f173966a6cfafd577c">   84</a></span>&#160;        int_size_t <a class="code" href="classelftosb_1_1_eval_context.html#a8f1495b8ddd636f173966a6cfafd577c">m_size</a>; </div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="classelftosb_1_1_eval_context.html#af351d98899bd386abb3dab2a258ea8fd">   85</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classelftosb_1_1_eval_context.html#af351d98899bd386abb3dab2a258ea8fd">m_isLocked</a>;   </div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    };</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classelftosb_1_1_eval_context.html#a68d31fc887ccdb9430c945c1ea6a474e">   89</a></span>&#160;    <span class="keyword">typedef</span> std::map&lt;std::string, variable_info_t&gt; <a class="code" href="classelftosb_1_1_eval_context.html#a68d31fc887ccdb9430c945c1ea6a474e">variable_map_t</a>;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="classelftosb_1_1_eval_context.html#a9f1840650a0389ba5c685160814f231b">   91</a></span>&#160;    <a class="code" href="classelftosb_1_1_eval_context_1_1_source_file_manager.html">SourceFileManager</a> *<a class="code" href="classelftosb_1_1_eval_context.html#a9f1840650a0389ba5c685160814f231b">m_sourcesManager</a>; </div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classelftosb_1_1_eval_context.html#aed94b180801b8b17cb7c4b8aea0322e3">   92</a></span>&#160;    variable_map_t <a class="code" href="classelftosb_1_1_eval_context.html#aed94b180801b8b17cb7c4b8aea0322e3">m_variables</a>;          </div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;};</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;}; <span class="comment">// namespace elftosb</span></div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="preprocessor">#endif // _EvalContext_h_</span></div><div class="ttc" id="classelftosb_1_1_eval_context_html_a15d91ed91bca7ec1efb09d2dca3d028d"><div class="ttname"><a href="classelftosb_1_1_eval_context.html#a15d91ed91bca7ec1efb09d2dca3d028d">elftosb::EvalContext::variable_info_t::m_value</a></div><div class="ttdeci">uint32_t m_value</div><div class="ttdoc">Variable value. </div><div class="ttdef"><b>Definition:</b> EvalContext.h:83</div></div>
<div class="ttc" id="classelftosb_1_1_eval_context_html_a68d31fc887ccdb9430c945c1ea6a474e"><div class="ttname"><a href="classelftosb_1_1_eval_context.html#a68d31fc887ccdb9430c945c1ea6a474e">elftosb::EvalContext::variable_map_t</a></div><div class="ttdeci">std::map&lt; std::string, variable_info_t &gt; variable_map_t</div><div class="ttdoc">Type to maps between the variable name and its info. </div><div class="ttdef"><b>Definition:</b> EvalContext.h:89</div></div>
<div class="ttc" id="classelftosb_1_1_eval_context_html_aed94b180801b8b17cb7c4b8aea0322e3"><div class="ttname"><a href="classelftosb_1_1_eval_context.html#aed94b180801b8b17cb7c4b8aea0322e3">elftosb::EvalContext::m_variables</a></div><div class="ttdeci">variable_map_t m_variables</div><div class="ttdoc">Map of variables to their final values. </div><div class="ttdef"><b>Definition:</b> EvalContext.h:92</div></div>
<div class="ttc" id="classelftosb_1_1_eval_context_html_a9f1840650a0389ba5c685160814f231b"><div class="ttname"><a href="classelftosb_1_1_eval_context.html#a9f1840650a0389ba5c685160814f231b">elftosb::EvalContext::m_sourcesManager</a></div><div class="ttdeci">SourceFileManager * m_sourcesManager</div><div class="ttdoc">Interface to source file manager. </div><div class="ttdef"><b>Definition:</b> EvalContext.h:91</div></div>
<div class="ttc" id="classelftosb_1_1_eval_context_html"><div class="ttname"><a href="classelftosb_1_1_eval_context.html">elftosb::EvalContext</a></div><div class="ttdoc">Context for evaluating AST tree and expressions. </div><div class="ttdef"><b>Definition:</b> EvalContext.h:28</div></div>
<div class="ttc" id="namespaceelftosb_html"><div class="ttname"><a href="namespaceelftosb.html">elftosb</a></div><div class="ttdef"><b>Definition:</b> BootImage.h:13</div></div>
<div class="ttc" id="classelftosb_1_1_source_file_html"><div class="ttname"><a href="classelftosb_1_1_source_file.html">elftosb::SourceFile</a></div><div class="ttdoc">Abstract base class for a source file containing executable code. </div><div class="ttdef"><b>Definition:</b> apps/elftosb/common/SourceFile.h:33</div></div>
<div class="ttc" id="classelftosb_1_1_eval_context_1_1_source_file_manager_html"><div class="ttname"><a href="classelftosb_1_1_eval_context_1_1_source_file_manager.html">elftosb::EvalContext::SourceFileManager</a></div><div class="ttdoc">Abstract interface for a manager of source files. </div><div class="ttdef"><b>Definition:</b> EvalContext.h:34</div></div>
<div class="ttc" id="classelftosb_1_1_eval_context_html_ac96959da6d939b887cf79cf425fc0c44"><div class="ttname"><a href="classelftosb_1_1_eval_context.html#ac96959da6d939b887cf79cf425fc0c44">elftosb::EvalContext::EvalContext</a></div><div class="ttdeci">EvalContext()</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> EvalContext.cpp:14</div></div>
<div class="ttc" id="classelftosb_1_1_eval_context_html_af351d98899bd386abb3dab2a258ea8fd"><div class="ttname"><a href="classelftosb_1_1_eval_context.html#af351d98899bd386abb3dab2a258ea8fd">elftosb::EvalContext::variable_info_t::m_isLocked</a></div><div class="ttdeci">bool m_isLocked</div><div class="ttdoc">Can this variable&amp;#39;s value be changed? </div><div class="ttdef"><b>Definition:</b> EvalContext.h:85</div></div>
<div class="ttc" id="classelftosb_1_1_eval_context_1_1_source_file_manager_html_a77eaf2b2bd129fd1ec495da9ede69713"><div class="ttname"><a href="classelftosb_1_1_eval_context_1_1_source_file_manager.html#a77eaf2b2bd129fd1ec495da9ede69713">elftosb::EvalContext::SourceFileManager::getDefaultSourceFile</a></div><div class="ttdeci">virtual SourceFile * getDefaultSourceFile()=0</div><div class="ttdoc">Returns the default source file, or NULL if none is set. </div></div>
<div class="ttc" id="classelftosb_1_1_eval_context_html_a55c89be51b2fb6e2ef43c71094d7350a"><div class="ttname"><a href="classelftosb_1_1_eval_context.html#a55c89be51b2fb6e2ef43c71094d7350a">elftosb::EvalContext::~EvalContext</a></div><div class="ttdeci">virtual ~EvalContext()</div><div class="ttdoc">Destructor. </div><div class="ttdef"><b>Definition:</b> EvalContext.cpp:19</div></div>
<div class="ttc" id="classelftosb_1_1_eval_context_1_1_source_file_manager_html_a72d8bb09805a7953d0f6f75bc6ecaab6"><div class="ttname"><a href="classelftosb_1_1_eval_context_1_1_source_file_manager.html#a72d8bb09805a7953d0f6f75bc6ecaab6">elftosb::EvalContext::SourceFileManager::hasSourceFile</a></div><div class="ttdeci">virtual bool hasSourceFile(const std::string &amp;name)=0</div><div class="ttdoc">Returns true if a source file with the name name exists. </div></div>
<div class="ttc" id="classelftosb_1_1_eval_context_html_a8f1495b8ddd636f173966a6cfafd577c"><div class="ttname"><a href="classelftosb_1_1_eval_context.html#a8f1495b8ddd636f173966a6cfafd577c">elftosb::EvalContext::variable_info_t::m_size</a></div><div class="ttdeci">int_size_t m_size</div><div class="ttdoc">Number of bytes. </div><div class="ttdef"><b>Definition:</b> EvalContext.h:84</div></div>
<div class="ttc" id="classelftosb_1_1_eval_context_1_1_source_file_manager_html_a3cd691ef5a323c66ce3056a808d5b419"><div class="ttname"><a href="classelftosb_1_1_eval_context_1_1_source_file_manager.html#a3cd691ef5a323c66ce3056a808d5b419">elftosb::EvalContext::SourceFileManager::getSourceFile</a></div><div class="ttdeci">virtual SourceFile * getSourceFile(const std::string &amp;name)=0</div><div class="ttdoc">Gets the requested source file. </div></div>
<div class="ttc" id="classelftosb_1_1_eval_context_html_structelftosb_1_1_eval_context_1_1variable__info__t"><div class="ttname"><a href="classelftosb_1_1_eval_context.html#structelftosb_1_1_eval_context_1_1variable__info__t">elftosb::EvalContext::variable_info_t</a></div><div class="ttdoc">Information about a variable&amp;#39;s value. </div><div class="ttdef"><b>Definition:</b> EvalContext.h:81</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_96c2f84c885cff71a930b6845f88cdd3.html">elftosb</a></li><li class="navelem"><a class="el" href="dir_c476059e18722267e10e2fb2cca6f785.html">common</a></li><li class="navelem"><b>EvalContext.h</b></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:50 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
